package com.xdf.xzymanagementsystem.config;

import org.apache.shiro.subject.Subject;
import org.apache.shiro.subject.SubjectContext;
import org.apache.shiro.web.mgt.DefaultWebSubjectFactory;
import org.springframework.context.annotation.Configuration;

/**
 * @program: xzy-management-system
 * @description: JWTsubject创建工厂
 * @author: 张柯
 * @create: 2021-01-19 09:00
 **/
@Configuration
public class JWTDefaultSubjectFactory extends DefaultWebSubjectFactory {
    @Override
    public Subject createSubject(SubjectContext context) {
        context.setSessionCreationEnabled(false);
        return super.createSubject(context);
    }
}
